package com.niit.springbootshop.service.impl;

import com.niit.springbootshop.dao.ProductDao;
import com.niit.springbootshop.entity.Product;
import com.niit.springbootshop.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: springboot-demo
 * @description:
 * @author: hanliang
 * @create: 2021-05-07 15:16
 **/
@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    ProductDao dao;

    @Override
    public List<Product> getHotProducts() {
        return dao.getHotProducts();
    }

    @Override
    public List<Product> getNewProducts() {
        return dao.getNewProducts();
    }

    @Override
    public List<Product> getByCsid(List<Integer> ids) {
        return dao.getByCsid(ids);
    }

    @Override
    public Product selectByPrimaryKey(Integer pid) {
        return dao.selectByPrimaryKey(pid);
    }
}
